package edu.zju.udms.dnavigator.core.utils;

public class StringUtils {
	public static String UpperFirst(String name) {
		if (name == null || name.length() == 0)
			return name;
		if (Character.isUpperCase(name.charAt(0)))
			return name;
		return Character.toUpperCase(name.charAt(0)) + name.substring(1);
	}

	public static String removeStart(String str, String remove) {
		if (isEmpty(str) || isEmpty(remove)) {
			return str;
		}
		if (str.startsWith(remove)) {
			return str.substring(remove.length());
		}
		return str;
	}

	public static boolean isEmpty(CharSequence cs) {
		return cs == null || cs.length() == 0;
	}
}
